package com.FastTorchPro;

import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.IBinder;

public class RotaitionService extends Service {
	
	 BroadcastReceiver bReceiver = new BroadcastReceiver() {
	        @Override
	        public void onReceive(Context context, Intent intent) {
//	        	  Toast toast = Toast.makeText(context, 
//	           			"service Create", Toast.LENGTH_SHORT); 
//	          			toast.show();
	            GlobalLogic.updateWidgets(context);// Code to refresh the widget
	        }
	    };
	    
	@Override
    public void onCreate() {
		
	    IntentFilter intentFilter = new IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED);
	    registerReceiver(bReceiver, intentFilter);   

        // TODO: ,      
    }

	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
	  
	    return Service.START_STICKY;
	}
	
	@Override
	public IBinder onBind(Intent arg0) {
		// TODO Auto-generated method stub
		return null;
	}

}
